package com.functest.orm

/**
 * @author DacydovMD
 * Date: 11.09.13
 */
interface QueryBuilder extends Builder<QueryExecutor> {
    QueryBuilder field(String f)

    /**
     *  Adds one column
     * @param expression something like count(*), $field1+$field2, etc. $field expressions will be parsed
     * automatically (will work ONLY with simple fields)
     * @param alias - how will it be mapped
     * @return
     */

    Map<String, String> getColumnAliases()

    QueryBuilder expression(String expression, alias)

    QueryBuilder distinct()

    QueryBuilder allFields()

    QueryBuilder fieldList(List<String> fields)

    WhereClauseBuilder where()

    WhereClauseBuilder where(Condition c)

    WhereClauseBuilder where(String field, ConditionOp op, def value)
}
